package com.wn.date20190807;

/*
 * 懒汉
 */
public class Singleton
{
	private Singleton()
	{
		System.out.println("懒汉实例化");
	}
	public static int num=123;
	private static Singleton singleton;
	public static Singleton getInstance()
	{
		if(singleton==null)
		{
			singleton=new Singleton();
		}
		return singleton;
	}
}
